<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>YOLO 8/11 目标检测demo</title>
    <style>
        #video_feed {
            width: 100%;
            max-width: 640px;  /* 或你想要的任何尺寸 */
        }
    </style>
</head>
<body>
    <h1>YOLO 8/11 实时目标检测demo</h1>
    <img id="video_feed" src="{{ url_for('video_feed') }}" alt="Video Feed">
    <script>
        function updateVideoFeed() {
            const img = document.getElementById('video_feed');
            img.src = '{{ url_for("video_feed") }}' + '?' + new Date().getTime();  // 添加时间戳以防止缓存
        }
        setInterval(updateVideoFeed, 1000);  // 每秒更新一次
    </script>
</body>
</html>